ci: repair envtest setup so the Checks test job passes - #758
Merged
Conversation
setup-envtest was pinned to a Nov 2022 version that fetches envtest binaries from the retired kubebuilder-tools GCS bucket, which now returns 401 Unauthorized. As a result `make test` resolved KUBEBUILDER_ASSETS="" and TestAPIs panicked with `etcd: executable file not found in $PATH`. ENVTEST_K8S_VERSION was also unset. Bump setup-envtest (tools/go.mod) to a current version that uses the GitHub-based envtest binary index, and set ENVTEST_K8S_VERSION to 1.29.0 to match the controller's k8s.io/api version. Verified locally: envtest provisions etcd and `go test ./controllers/...` passes. Co-Authored-By: Claude <noreply@anthropic.com> Ref: EC-2167
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #758 +/- ##
=====================================
Coverage 0.66% 0.66%
=====================================
Files 6 6
Lines 301 301
=====================================
Hits 2 2
Misses 299 299
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
make testfails for every PR (the requiredChecksjob): it resolvesKUBEBUILDER_ASSETS=""andTestAPIspanics withexec: "etcd": executable file not found in $PATH.Root cause (reproduced locally):
setup-envtestwas pinned to a Nov 2022version that lists/downloads envtest binaries from the retired
kubebuilder-toolsGCS bucket, which now returns 401 Unauthorized. AlsoENVTEST_K8S_VERSIONwas unset.Fix
setup-envtestintools/go.modto a current version that uses theGitHub-based envtest binary index.
ENVTEST_K8S_VERSION ?= 1.29.0in the Makefile (matches the controller'sk8s.io/apiv0.29).Change is confined to the
toolsbuild module + Makefile; the main module isuntouched and the
godirective is unchanged (1.23.6).Verification
Locally:
setup-envtest use 1.29.0 -p pathnow provisions etcd/kube-apiserver,and
go test ./controllers/...→ok(TestAPIs passes). This PR's ownChecksrun is the CI confirmation.
Unblocks the EC-2130 SHA-pinning PR (#757), which was blocked by this required
check.
Ref: EC-2167